Skip to content

Workspace CI job clean up#4459

Open
joostjager wants to merge 1 commit intolightningdevkit:mainfrom
joostjager:ci-cleanup-redundant-checks
Open

Workspace CI job clean up#4459
joostjager wants to merge 1 commit intolightningdevkit:mainfrom
joostjager:ci-cleanup-redundant-checks

Conversation

@joostjager
Copy link
Contributor

@joostjager joostjager commented Mar 4, 2026

No description provided.

@ldk-reviews-bot
Copy link

ldk-reviews-bot commented Mar 4, 2026

👋 Thanks for assigning @jkczyz as a reviewer!
I'll wait for their review and will help manage the review process.
Once they submit their review, I'll check if a second reviewer would be helpful.

@joostjager joostjager marked this pull request as ready for review March 4, 2026 13:30
@ldk-reviews-bot ldk-reviews-bot requested a review from jkczyz March 4, 2026 13:30
@@ -6,12 +6,10 @@ source "$(dirname "$0")/ci-tests-common.sh"

echo -e "\n\nChecking and testing lightning with features"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you remove the check part, you might want to update the printed message here and elsewhere to remove the Checking part.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed. I left it in place in ci-tests-sync.sh, because there is still some only-checking in non CI.


if [ -z "$CI_ENV" ] && [[ -z "$BITCOIND_EXE" || -z "$ELECTRS_EXE" ]]; then
echo -e "\n\nSkipping testing Transaction Sync Clients due to BITCOIND_EXE or ELECTRS_EXE being unset."
cargo check -p lightning-transaction-sync --tests
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this line dropped?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Restored

@joostjager joostjager force-pushed the ci-cleanup-redundant-checks branch from 03629f0 to 6b0eeea Compare March 5, 2026 08:08
@joostjager joostjager requested a review from tnull March 5, 2026 08:40
@codecov
Copy link

codecov bot commented Mar 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.09%. Comparing base (90b79e4) to head (c0cdaaa).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4459      +/-   ##
==========================================
+ Coverage   85.97%   86.09%   +0.12%     
==========================================
  Files         159      159              
  Lines      104722   105185     +463     
  Branches   104722   105185     +463     
==========================================
+ Hits        90030    90559     +529     
+ Misses      12191    12115      -76     
- Partials     2501     2511      +10     
Flag Coverage Δ
tests 86.09% <ø> (+0.12%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@joostjager joostjager self-assigned this Mar 5, 2026
Copy link
Contributor

@jkczyz jkczyz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review courtesy of Claude

# shellcheck source=ci/ci-tests-common.sh
source "$(dirname "$0")/ci-tests-common.sh"

echo -e "\n\nChecking and testing Block Sync Clients with features"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drop "Checking and ".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left it in place (#4459 (comment)), but also fine with removing. Removed.

Comment on lines 8 to 11
cargo check --tests --quiet --color always

WORKSPACE_MEMBERS=( $(cat Cargo.toml | tr '\n' '\r' | sed 's/\r //g' | tr '\r' '\n' | grep '^members =' | sed 's/members.*=.*\[//' | tr -d '"' | tr ',' ' ') )

echo -e "\n\nTesting the workspace, except lightning-transaction-sync."
echo -e "\n\nTesting the workspace."
cargo test --quiet --color always
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these two redundant?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the goal is to fail as fast as possible - perhaps 🤷‍♂️

cargo check -p lightning-transaction-sync --tests --quiet --color always --features esplora-async-https
cargo check -p lightning-transaction-sync --tests --quiet --color always --features electrum
else
echo -e "\n\nTesting Transaction Sync Clients with features."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this also test without any features?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should indeed be consistent. The crate doesn't contains anything without a feature it seems (lib.rs), but maybe we do want to check that it doesn't error. Added the test without features. diff

@joostjager joostjager force-pushed the ci-cleanup-redundant-checks branch 2 times, most recently from ab5a336 to c0cdaaa Compare March 6, 2026 09:32
@joostjager joostjager requested a review from jkczyz March 6, 2026 10:24
jkczyz
jkczyz previously approved these changes Mar 6, 2026
@ldk-reviews-bot
Copy link

🔔 1st Reminder

Hey @tnull! This PR has been waiting for your review.
Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.

@ldk-reviews-bot
Copy link

🔔 2nd Reminder

Hey @tnull! This PR has been waiting for your review.
Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.

Copy link
Collaborator

@TheBlueMatt TheBlueMatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cargo check does something different than cargo test. It doesn't check with test-specific features enabled and thus can catch bugs where we have code that only builds with test features. I don't think these should be removed (they're also incredibly cheap).

Replace the per-member cargo check + cargo doc loop with a single
`cargo doc --workspace` call. The per-member cargo check is redundant
with the workspace-level cargo check already run earlier in the script.
Also remove the separate `cargo test -p lightning-custom-message` which
is covered by the workspace-level cargo test.

Fix stale "except lightning-transaction-sync" echo messages, as it has
been a workspace member for a while now.

AI tools were used in preparing this commit.
@joostjager
Copy link
Contributor Author

cargo check does something different than cargo test. It doesn't check with test-specific features enabled and thus can catch bugs where we have code that only builds with test features. I don't think these should be removed (they're also incredibly cheap).

I think you mean cargo check checks #[cfg(not(test))]? Good point. The goal wasn't really speed up here, but just simplification. Reverted.

That leaves just the workspace build simplification.

@joostjager joostjager changed the title Remove redundant cargo check/test calls from CI scripts Workspace CI job clean up Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

5 participants